package cn.zhuzicc.basic.jvm.t1;

/**
 * @author zhaoxiang
 * @version 1.0
 * @description 演示查看堆内存命令
 * jsp
 * jamp
 * jconsole
 * @Date 2021/9/19 15:23
 */
public class Demo1_4 {
    public static void main(String[] args) throws InterruptedException {
        System.out.println("1....");
        Thread.sleep(30000);
        byte[] bytes = new byte[1024 * 1024 * 10];// 10Mb
        System.out.println("2...");
        Thread.sleep(20000);
        bytes = null;
        // 等待回收
        System.gc();
        System.out.println("3...");
        Thread.sleep(100000L);
    }
}